n=int(input("请输入一个数字:"))
if n>=1 and n<=9:
    for i in range(n,0,-1):
        print('    '*(9-i), end ='')
        for j in range(i,0,-1):
            print('{}*{}={}'.format(i,j,i*j),end=' ')
        print()
else:
    print("请输入1-9以内任意数字")
    